# Needed for connections
require 'Win32API'
require 'socket'
include Socket::Constants
require "ClassDebug.rb"
require "ClassSensor.rb"
require "ClassTank.rb"
require "ClassChatServer.rb"
require "ClassMotor.rb"
require "ClassK8055.rb"
require "ClassOutput.rb"




#openDevice.Call(0)
vm1 = K8055.new(0)

#vm1.outputAnalogChannel(1, 10)
#vm1.outputAnalogChannel(2, 90)
puts "testiung"
#vm1.testOutputs
#vm1.outputAnalogChannel(1, 10)
#vm1.outputAnalogChannel(2, 90)
on = true
while 1
	#puts "new loop"
	if on then
		on = false
		#puts "Sets"
		vm1.setDigitalChannel(5)
	else
		on = true
		#puts "Clears"
		vm1.clearDigitalChannel(5)
	end
	#sleep 0.005
end